toolpath = /home/lhy/arm_linux/tool/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin

cc = ${toolpath}/arm-linux-gnueabihf-gcc
ld = ${toolpath}/arm-linux-gnueabihf-ld
objcopy = ${toolpath}/arm-linux-gnueabihf-objcopy
objdump = ${toolpath}/arm-linux-gnueabihf-objdump

led.bin:led.s
	${cc} -g -c led.s -o led.o
	${ld} -Ttext 0X87800000 led.o -o led.elf
	${objcopy} -O binary -S -g led.elf led.bin
	${objdump} -D led.elf > led.dis
	
clean:
	rm -rf *.o led.bin led.elf led.dis load.imx